package collect.collection.set;


import java.util.LinkedHashSet;

public class TestLinkedHashSet {
    public static void main(String[] args) {
        LinkedHashSet<Student> set = new LinkedHashSet<>();
        Student s2 = new Student("李四", 24);
        Student s3 = new Student("张三", 23);
        Student s1 = new Student("王五", 23);
        set.add(s1);
        set.add(s2);
        set.add(s3);

        System.out.println(set);
    }
}
